home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / basic / qbware.exe / BARMENU2.BAS < prev    next >
BASIC Source File  |  1990-11-30  |  2KB  |  101 lines

  1. '*****************************************************************************
  2. '
  3. '   BarMenu2.Bas
  4. '
  5. '*****************************************************************************
  6.  
  7. 'Copyright (c) 1988 Marcel Madonna
  8.  
  9. 'BarMenu2.BAS shows the use of a simple MS WORD-like bar menu
  10. '  with QBWARE.
  11. '*****************************************************************************
  12.  
  13.  
  14.     OPTION BASE 1
  15.  
  16.  
  17.  
  18.     Snow% = 1                       'Assume you will see no flicker
  19.                     'Change this value to 0 if the screen
  20.                     'flickers
  21.  
  22.  
  23.     RESTORE BarMenu2.Txt             'Menu items
  24.  
  25.     READ Count%
  26.     REDIM MenuText$(Count%)
  27.     x% = 1
  28.     READ MenuText$(1)
  29.     WHILE MenuText$(x%) <> "EOM" AND x% <= Count%
  30.         x% = x% + 1
  31.         READ MenuText$(x%)
  32.     WEND
  33.     MenuText$(x%) = ""
  34.  
  35.     Header$ = "MAIN MENU:"
  36.     Tr% = 1: Fg% = 15: Bg% = 1
  37.     CALL BarMenu2(MenuText$(), Header$, Tr%, Fg%, Bg%, Snow%, Answer%)
  38.  
  39.     ON Answer% GOSUB Item1, Item2, Item3, Item4, Item5, Item6, Item7, Item8, Item9, Item10, Item11, Item12, Item13, Item14, Item15, Item16, Item17, Item18, Item19
  40.  
  41.  
  42.  
  43.     CLS
  44.     PRINT "You have exited without making a selection"
  45.     END
  46.  
  47. Item1:
  48. Item2:
  49. Item3:
  50. Item4:
  51. Item5:
  52. Item6:
  53. Item7:
  54. Item8:
  55. Item9:
  56. Item10:
  57. Item11:
  58. Item12:
  59. Item13:
  60. Item14:
  61. Item15:
  62. Item16:
  63. Item17:
  64. Item18:
  65. Item19:
  66.  
  67.     CLS
  68.     PRINT "You have selected item" + STR$(Answer%)
  69.     END
  70.  
  71.  
  72.  
  73. ' These are the menu choices.
  74.  
  75. BarMenu2.Txt:
  76.     DATA 20
  77.     DATA "AItem"
  78.     DATA "BItem"
  79.     DATA "CItem"
  80.     DATA "DItem"
  81.     DATA "EItem"
  82.     DATA "FItem"
  83.     DATA "GItem"
  84.     DATA "HItem"
  85.     DATA "IItem"
  86.     DATA "JItem"
  87.     DATA "KItem"
  88.     DATA "LItem"
  89.     DATA "MItem"
  90.     DATA "NItem"
  91.     DATA "OItem"
  92.     DATA "PItem"
  93.     DATA "QItem"
  94.     DATA "RItem"
  95.     DATA "SItem"
  96.     DATA "EOM"
  97.  
  98.     END
  99.                               
  100.  
  101.